<script setup>
import {
    Management,
    Promotion,
    UserFilled,
    User,
    Crop,
    EditPen,
    SwitchButton,
    CaretBottom,
    Histogram
} from '@element-plus/icons-vue'
import avatar from '@/assets/default.png'
</script>

<template>
    <el-container class="layout-container">
        <!-- 左侧菜单 -->
        <el-aside width="200px">
            <div class="el-aside__logo"></div>
            <el-menu active-text-color="#388bea" background-color="#fff" text-color="#232323" router>
                <el-menu-item index="/talent/manage">
                    <el-icon>
                        <UserFilled />
                    </el-icon>
                    <span>人才库管理</span>
                </el-menu-item>
                <el-menu-item index="/recruitment/RecruitmentManage">
                    <el-icon>
                        <Promotion />
                    </el-icon>
                    <span>招聘岗位管理</span>
                </el-menu-item>
                <el-menu-item index="/talentResume/manage">
                    <el-icon>
                        <Management />
                    </el-icon>
                    <span>简历管理</span>
                </el-menu-item>
                <el-menu-item index="/recruitment/recruitmentInterview">
                    <el-icon>
                        <Crop />
                    </el-icon>
                    <span>面试管理</span>
                </el-menu-item>
                <el-menu-item index="/talent/talentData">
                    <el-icon>
                        <Histogram />
                    </el-icon>
                    <span>人才库数据报表</span>
                </el-menu-item>
            </el-menu>
        </el-aside>
        <!-- 右侧主区域 -->
        <el-container>
            <!-- 头部区域 -->
            <el-header>
                <div><strong style="color: white;font-size: 20px;">凯恒综合信息管理系统</strong></div>
                <el-dropdown placement="bottom-end">
                    <span class="el-dropdown__box">
                        <el-avatar :src="avatar" />
                        <el-icon>
                            <CaretBottom />
                        </el-icon>
                    </span>
                    <template #dropdown>
                        <el-dropdown-menu>
                            <el-dropdown-item command="profile" :icon="User">基本资料</el-dropdown-item>
                            <el-dropdown-item command="avatar" :icon="Crop">更换头像</el-dropdown-item>
                            <el-dropdown-item command="password" :icon="EditPen">重置密码</el-dropdown-item>
                            <el-dropdown-item command="logout" :icon="SwitchButton">退出登录</el-dropdown-item>
                        </el-dropdown-menu>
                    </template>
                </el-dropdown>
            </el-header>
            <!-- 中间区域 -->
            <el-main>
                <!--<div style="width: 1290px; height: 570px;border: 1px solid red;">
                    内容展示区
                </div>-->
                <router-view></router-view>
            </el-main>
            <!-- 底部区域 -->
            <el-footer>人才库 ©2025 Created by FIT</el-footer>
        </el-container>
    </el-container>
</template>

<style lang="scss" scoped>
.layout-container {
    height: 100vh;

    .el-aside {
        background-color: #fff;

        &__logo {
            height: 60px;
            background: url('@/assets/logo-bg.png') no-repeat center / 120px auto;
        }

        .el-menu {
            border-right: none;
        }
    }

    .el-header {
        background-color: #0c0c0c;
        display: flex;
        align-items: center;
        justify-content: space-between;

        .el-dropdown__box {
            display: flex;
            align-items: center;

            .el-icon {
                color: #999;
                margin-left: 10px;
            }

            &:active,
            &:focus {
                outline: none;
            }
        }
    }

    .el-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: #666;
    }
}
</style>